import request from '@/utils/request'

//客户概况首页
export function getIndex (params) {
  return request({
    url: 'channel/member/index',
    method: 'get',
    params
  })
}
//客户会员列表及搜索
export function getMemberLis (params) {
  return request({
    url: 'channel/member/get-member-list',
    method: 'get',
    params
  })
}

// 合并选中的数据
export function setMemberList (data) {
  return request({
    url: 'channel/member/get-member-list',
    method: 'post',
    data
  })
}
// 查找用户
export function selectUser (data) {
  return request({
    url: 'channel/activity/select-user',
    method: 'post',
    data
  })
}
//客户会员拉黑及删除
export function changeStatus (data) {
  return request({
    url: 'channel/member/change-status',
    method: 'post',
    data
  })
}
//客户会员批量修改余额和积分
export function changeInfo (data) {
  return request({
    url: 'channel/member/change-info',
    method: 'post',
    data
  })
}
//客户标签保存及修改
export function memberLabelSave (data) {
  return request({
    url: 'channel/member/member-label-save',
    method: 'post',
    data
  })
}
//客户标签禁用和删除
export function changeMemberLabel (data) {
  return request({
    url: 'channel/member/change-member-label',
    method: 'post',
    data
  })
}
// 获取客户标签列表
export function getMemberLabel (params) {
  return request({
    url: 'channel/member/get-member-label',
    method: 'get',
    params
  })
}
//客户录入
export function memberInput (data) {
  return request({
    url: 'channel/member/member-input',
    method: 'post',
    data
  })
}
//会员资料录入模板下载
export function excelDown (params) {
  return request({
    url: 'channel/member/excel-down',
    method: 'get',
    params
  })
}
//客户录入记录
export function memberExcelList (params) {
  return request({
    url: 'channel/member/member-excel-list',
    method: 'get',
    params
  })
}
//用户详情
export function getMemberInfo (data) {
  return request({
    url: 'channel/member/get-member-info',
    method: 'post',
    data
  })
}
//用户详情保存
export function memberInfoSave (data) {
  return request({
    url: 'channel/member/member-info-save',
    method: 'post',
    data
  })
}

//获取储值列表
export function getDepositList (params) {
  return request({
    url: 'channel/member/get-deposit-list',
    method: 'get',
    params
  })
}
//储值规则保存提交信息
export function postDepositSave (data) {
  return request({
    url: 'channel/member/deposit-save',
    method: 'post',
    data
  })
}
//储值规则保存查看信息
export function getDepositSave (params) {
  return request({
    url: 'channel/member/deposit-save',
    method: 'get',
    params
  })
}
//查找优惠券
export function getSelectCoupon (params) {
  return request({
    url: 'channel/activity/select-coupon',
    method: 'get',
    params
  })
}
//储值修改充值状态
export function modifyDeposit (data) {
  return request({
    url: 'channel/member/modify-deposit',
    method: 'post',
    data
  })
}
//储值细节设置获取
export function getDepositSet (params) {
  return request({
    url: 'channel/member/get-deposit-set',
    method: 'get',
    params
  })
}
//储值细节设置保存
export function depositSetSave (data) {
  return request({
    url: 'channel/member/deposit-set-save',
    method: 'post',
    data
  })
}
//获取储值明细列表
export function getDepositOrder (params) {
  return request({
    url: 'channel/member/get-deposit-order',
    method: 'get',
    params
  })
}
//获取积分明细列表
export function getIntegralList (params) {
  return request({
    url: 'channel/member/get-integral-list',
    method: 'get',
    params
  })
}
//获取积分设置信息
export function getIntegralInfo (params) {
  return request({
    url: 'channel/member/get-integral-info',
    method: 'get',
    params
  })
}
//积分系统设置
export function integralSet (data) {
  return request({
    url: 'channel/member/integral-set',
    method: 'post',
    data
  })
}
//获取客户系统设置
export function getMemberSetInfo (params) {
  return request({
    url: 'channel/member/get-member-set-info',
    method: 'get',
    params
  })
}
//客户系统设置(下单必须手机号码 登陆必须手机号码)修改及保存
export function memberSet (data) {
  return request({
    url: 'channel/member/member-set',
    method: 'post',
    data
  })
}

//会员卡权益列表
export function rightsList (params) {
  return request({
    url: 'channel/vip-card/rights-list',
    method: 'get',
    params
  })
}
//保存权益 查看数据
export function getSaveRights (params) {
  return request({
    url: 'channel/vip-card/save-rights',
    method: 'get',
    params
  })
}
//保存权益  提交数据
export function postSaveRights (data) {
  return request({
    url: 'channel/vip-card/save-rights',
    method: 'post',
    data
  })
}
//修改权益
export function modifyRights (data) {
  return request({
    url: 'channel/vip-card/modify-rights',
    method: 'post',
    data
  })
}
//会员卡等级列表
export function levelList (params) {
  return request({
    url: 'channel/vip-card/level-list',
    method: 'get',
    params
  })
}
//保存等级 查看数据
export function getSaveLevel (params) {
  return request({
    url: 'channel/vip-card/save-level',
    method: 'get',
    params
  })
}
//保存等级  提交数据
export function postSaveLevel (data) {
  return request({
    url: 'channel/vip-card/save-level',
    method: 'post',
    data
  })
}
//开卡记录
export function cardRecord (params) {
  return request({
    url: 'channel/vip-card/card-record',
    method: 'get',
    params
  })
}
//查看商品会员价
export function goodsVip (params) {
  return request({
    url: 'channel/good/goods-vip',
    method: 'get',
    params
  })
}
//修改商品会员价
export function saveGoodsVip (data) {
  return request({
    url: 'channel/good/save-goods-vip',
    method: 'post',
    data
  })
}
//获取用户优惠券列表
export function getCouponList (params) {
  return request({
    url: 'channel/member/get-coupon-list',
    method: 'get',
    params
  })
}
//获取门店优惠券列表
export function storeCouponList (params) {
  return request({
    url: 'channel/member/store-coupon-list',
    method: 'get',
    params
  })
}
//指定用户发送优惠券
export function sendCoupon (data) {
  return request({
    url: 'channel/member/send-coupon',
    method: 'post',
    data
  })
}
//修改等级状态
export function modifyLevel (data) {
  return request({
    url: 'channel/vip-card/modify-level',
    method: 'post',
    data
  })
}
